package com.example.demo.jedis;


import org.junit.jupiter.api.Test;
import redis.clients.jedis.Jedis;

import java.util.Set;

public class JedisDemo1 {
    public static void main(String[] args) {
        Jedis jedis=new Jedis( "172.23.64.1",6379);
        jedis.auth("123456");
        String value=jedis.ping();
        System.out.println(value);
    }
    @Test
    public void demo(){
        Jedis jedis=new Jedis( "172.23.64.1",6379);
        jedis.auth("123456");
        Set<String> keys=jedis.keys("*");

        for (String key:keys
             ) {
            System.out.println(key);
        }
    }
}
